
//
//  UIBarButtonItem+Extension.swift
//  LJWeibo
//
//  Created by Raymond on 15/12/20.
//  Copyright © 2015年 liu. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    convenience init(imageName: String) {
        let button = UIButton()
        let highLightImageName = imageName + "_highlighted"
        button.setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        button.setImage(UIImage(named: highLightImageName), forState: UIControlState.Highlighted)
        button.sizeToFit()
        
        self.init(customView: button)
    }
    
}


